<template lang="html">
	<div class="Index">
		<mt-navbar v-model="moduleid">
			<mt-tab-item id="1">幼升小</mt-tab-item>
			<mt-tab-item id="2">小升初</mt-tab-item>
			<mt-tab-item id="3">中考</mt-tab-item>
			<mt-tab-item id="4">高考</mt-tab-item>
		</mt-navbar>
		<askInput></askInput>
		<search @queryinfo='queryinfo'></search>
		<msgList   ref="child"></msgList>
		<!-- <mt-tab-container v-model="selected">
			<mt-tab-container-item id="1">
			
			</mt-tab-container-item>
			<mt-tab-container-item id="2">
				<msgList :selectid='selected'   ref="child"></msgList>
			</mt-tab-container-item>
			<mt-tab-container-item id="3">
				<msgList  :selectid='selected'  ref="child"></msgList>
			</mt-tab-container-item>
			<mt-tab-container-item id="4">
				<msgList  :selectid='selected'  ref="child"></msgList>
			</mt-tab-container-item>
		</mt-tab-container> -->
		
	</div>

</template>

<script>
import { mapGetters } from 'vuex'
import askInput from '@/components/Index/ask-input'
import msgList from '@/components/Index/msgList'
import search from '@/components/Index/search'
export default {
	data () {
		return {
			moduleid:'1',
		}
	},
	created () {
		this.moduleid=this.vuexmoduleid	
	},
	components: {
		askInput,
		msgList,
		search,
	},
	methods: {
		queryinfo(msg){
			this.$refs.child.childqueryinfo(msg)//调用子组件  childqueryinfo方法
		}
	},
	watch:{
		moduleid(){
			this.$store.commit('vuexmoduleidSave', this.moduleid)
		}
	},
	computed:{
		...mapGetters([
		  	'vuexmoduleid',
		]),
		vuexmoduleid(){
			return this.$store.state.vuexmoduleid
		}
	}
}
</script>

<style lang="scss" scoped>
//模块文字大小
.mint-tab-item-label { //修改源代码  不知道为啥定义改不了
    color: inherit;
    font-size: 0.5rem;
    line-height: 1;
}
.mint-navbar .mint-tab-item.is-selected {
    // border-bottom: 0.04rem solid #26a2ff;
    color: white;
	background-color: #26a2ff;
    margin-bottom: -0.04rem;
}
</style>
